<?php

namespace App\Admin\Exports\Sheet;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
use App\Models\TextbookAudio\TextbookAudio;
class TextbookAudioSheet implements FromCollection, WithHeadings, WithTitle
{
    public function collection()
    {
        return TextbookAudio::query()->select([
            'id', 'category_id', 'unit_name', 'title', 'original_singer',
            'vocal_accompaniment', 'captions', 'video', 'duration'
        ])->get();
    }

    public function headings(): array
    {
        return [
            '歌曲歌谣编号', '年级编号', '单元名称', '歌曲标题','原唱地址','伴唱地址','字幕','视频地址','时长'
        ];
    }
    public function title(): string
    {
        return '歌曲歌谣';
    }
}
